<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>最新天气详情</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
    <style>
        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            padding: 20px;
        }
        .weather-container {
            width: 100%;
            max-width: 900px;
            margin: 0 auto;
        }
        .weather-card {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            overflow: hidden;
        }
        .weather-header {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            padding: 30px;
            text-align: center;
        }
        .weather-icon {
            font-size: 5rem;
            margin-bottom: 20px;
        }
        .temperature {
            font-size: 4rem;
            font-weight: 300;
            line-height: 1;
        }
        .weather-details {
            padding: 30px;
        }
        .data-group {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
        }
        .data-item {
            flex: 1;
            min-width: 200px;
            background: #f8f9fa;
            border-radius: 10px;
            padding: 15px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.05);
        }
        .data-label {
            font-size: 0.9rem;
            color: #6c757d;
            margin-bottom: 5px;
        }
        .data-value {
            font-size: 1.5rem;
            font-weight: 500;
        }
        .map-container {
            height: 300px;
            border-radius: 15px;
            overflow: hidden;
            margin-top: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        .back-button {
            margin-top: 20px;
            text-align: center;
            padding: 0 30px 30px;
        }
        .weather-condition {
            font-size: 1.2rem;
            margin-top: 10px;
        }
        .section-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #6a11cb;
            margin-top: 25px;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #f0f0f0;
        }
    </style>
</head>
<body>
    <div class="weather-container">
        <div class="weather-card">
            <div class="weather-header">
                <i class="bi bi-geo-alt-fill weather-icon"></i>
                <h1 class="mb-3">{{ city }}</h1>
                <div class="temperature">{{ temperature }}°C</div>
                <div class="weather-condition">{{ weather_condition }}</div>
            </div>

            <div class="weather-details">
                <div class="section-title">基本气象数据</div>
                <div class="data-group">
                    <div class="data-item">
                        <div class="data-label">
                            <i class="bi bi-thermometer-half"></i> 温度
                        </div>
                        <div class="data-value">{{ temperature }}°C</div>
                    </div>
                    <div class="data-item">
                        <div class="data-label">
                            <i class="bi bi-droplet"></i> 湿度
                        </div>
                        <div class="data-value">{{ humidity }}%</div>
                    </div>
                    <div class="data-item">
                        <div class="data-label">
                            <i class="bi bi-wind"></i> 风速
                        </div>
                        <div class="data-value">{{ wind_speed }} m/s</div>
                    </div>
                </div>

                <div class="section-title">体感与环境</div>
                <div class="data-group">
                    <div class="data-item">
                        <div class="data-label">
                            <i class="bi bi-thermometer-high"></i> 体感温度
                        </div>
                        <div class="data-value">{{ feels_like }}°C</div>
                    </div>
                    <div class="data-item">
                        <div class="data-label">
                            <i class="bi bi-eye-fill"></i> 能见度
                        </div>
                        <div class="data-value">{{ visibility }} km</div>
                    </div>
                    <div class="data-item">
                        <div class="data-label">
                            <i class="bi bi-clock-fill"></i> 更新时间
                        </div>
                        <div class="data-value">{{ timestamp }}</div>
                    </div>
                </div>
            </div>

            <div class="back-button">
                <a href="/api/weather/home" class="btn btn-outline-primary">
                    <i class="bi bi-arrow-left"></i> 返回首页
                </a>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
